﻿<%@ Page Language="C#" MasterPageFile="~/Site.master" AutoEventWireup="true" CodeBehind="Register.aspx.cs" Inherits="Account_Registration" %>

<asp:Content ID="Content1" ContentPlaceHolderId="MainContent" runat="server">
  
<h3>Registration of new User!</h3>
    
    <asp:label ID="otherErrors" runat="server"/>
    <div style="height: 461px">
        <asp:ValidationSummary ID="RegisterUserValidationSummary" runat="server" CssClass="failureNotification" 
                 ValidationGroup="RegisterUserValidationGroup"/>
        <div style="height: 90px">
            <table style="width: 100%; height: 81px;">
                <tr>
                    <td class="style1" style="vertical-align: top">
                        <asp:Label ID="LoginLabel" runat="server" Text="Login:"></asp:Label>
                    </td>
                    <td style="vertical-align: top">
                        <asp:TextBox ID="LoginTextBox" runat="server"></asp:TextBox>
                        <asp:RequiredFieldValidator ID="LoginRequiredFieldValidator" runat="server" ControlToValidate="NameTextBox" 
                             CssClass="failureNotification" ErrorMessage="Login is required." ToolTip="Login is required." 
                             ValidationGroup="RegisterUserValidationGroup">*</asp:RequiredFieldValidator>
            
                    </td>
                </tr>
                <tr>
                    <td class="style1" style="vertical-align: top">
                        <asp:Label ID="PassLabel" runat="server" Text="Password:"></asp:Label>
                    </td>
                    <td style="vertical-align: top">
                    <asp:TextBox ID="PassTextBox" runat="server" TextMode="Password"
                    ></asp:TextBox>
                    <asp:RequiredFieldValidator ID="PassRequiredFieldValidator" runat="server" ControlToValidate="NameTextBox" 
                             CssClass="failureNotification" ErrorMessage="Password is required." ToolTip="Password is required." 
                             ValidationGroup="RegisterUserValidationGroup">*</asp:RequiredFieldValidator>
            
                    
                    </td>
                    
                </tr>
                <tr>
                    <td class="style1" style="vertical-align: top">
                        <asp:Label ID="NameLabel" runat="server" Text="Name:"></asp:Label>
                    </td>
                    <td style="vertical-align: top">
                        <asp:TextBox ID="NameTextBox" runat="server"></asp:TextBox>
                    <asp:RequiredFieldValidator ID="UserNameRequired" runat="server" ControlToValidate="NameTextBox" 
                             CssClass="failureNotification" ErrorMessage="User Name is required" ToolTip="User Name is required." 
                             ValidationGroup="RegisterUserValidationGroup">*</asp:RequiredFieldValidator>
                   
                    </td>
                    
                </tr>
                <tr>
                    <td class="style1" style="vertical-align: top">
                        <asp:Label ID="SurnameLabel" runat="server" Text="Surname:"></asp:Label>
                    </td>
                    <td style="vertical-align: top">
                        <asp:TextBox ID="SurnameTextBox" runat="server"></asp:TextBox>
                        <asp:RequiredFieldValidator ID="UserSurnameRequired" runat="server" ControlToValidate="SurnameTextBox" 
                             CssClass="failureNotification" ErrorMessage="User Surname is required." ToolTip="User Surname is required." 
                             ValidationGroup="RegisterUserValidationGroup">*</asp:RequiredFieldValidator>
                  
                    </td>
                    
                </tr>
                
                <tr>
                    <td class="style1" style="vertical-align: top">
                        
                        <asp:Label ID="DateLabel" runat="server" Text="Birthday date:"></asp:Label>
                        
                    </td>
                    <td style="vertical-align: top">
                    
                        <asp:TextBox ID="DateBox" runat="server"></asp:TextBox>
                         <asp:RequiredFieldValidator ID="DateRequiredFieldValidator" runat="server" ControlToValidate="DateBox" 
                             CssClass="failureNotification" ErrorMessage="Birthday date is required" ToolTip="Birthday date is required." 
                             ValidationGroup="RegisterUserValidationGroup">*</asp:RequiredFieldValidator>
                                             
                         <asp:RegularExpressionValidator runat="server" ID="DateValidator" 
                            ControlToValidate="DateBox" ValidationGroup="RegisterUserValidationGroup"
                                ErrorMessage="format dd.mm.yyyy" 
                                    ValidationExpression="^([0-2]\d|3[0-1])\.(0\d|1[0-2])\.([1-2]\d{3})$"/>
                            

                                                              
                       

                    
                    </td>
                    
                </tr>

                <tr>
                    <td class="style1" style="vertical-align: top">
                        
                        <asp:Label ID="FotoLabel" runat="server" Text="Foto"></asp:Label>
                        
                        :</td>
                    <td style="vertical-align: top">
                    
                        <asp:FileUpload ID="FotoUpload" runat="server" />
                        <asp:RegularExpressionValidator runat="server" ID="FotoValidator" ControlToValidate="FotoUpload" 
                            ValidationGroup="RegisterUserValidationGroup"
                                ErrorMessage="Image Files Only (.jpg)"
                                    ValidationExpression="^(([a-zA-Z]:)|(\\{2}\w+)\$?)(\\(\w[\w].*))(.jpg|.JPG|.jpeg|.JPEG)$" /><br />
                    </td>
                    
                </tr>
                
                <tr>
                    <td class="style1" style="vertical-align: top">
                        <asp:Label ID="CityLabel" runat="server" Text="City:"></asp:Label>
                    </td>
                    <td style="vertical-align: top">
                        <asp:TextBox ID="CityTextBox" runat="server"></asp:TextBox>
                    </td>
                    
                </tr>
               
                
             </table>
             <asp:Button ID="SubmitButton" runat="server" Text="Submit" CommandName="Login" 
                        ValidationGroup="RegisterUserValidationGroup" 
                onclick="SubmitButton_Click" Width="130px" 
                         />
        
            
        
        </div>
        
    
    </div>
    
</asp:Content>
